The present invention relates to a method and/or architecture for address translation circuits generally and, more particularly, to an address translation circuit for multiple processors utilizing a single code image stored in a shared memory region.
Complex embedded control systems often incorporate multiple processors. Each processor has a local block of private memory where a limited amount of code and data unique to that processor are stored. All of the processors also have access to an external block of shared memory where more code and more data are stored. The shared memory provides greater storage capacity than the private memory.
Each processor executes a common binary code image to manipulate the data allocated to the processor. To avoid conflicts between processors within the shared memory, each processor is mapped to a unique address range within the shared memory. Consequently, each processor executing code from the shared memory must have a dedicated copy of the code stored in the shared memory. The dedicated copy of the code must reside within the unique address range for the respective processor. A result is that multiple copies of the same code image must be stored for the multiple processors thus consuming the shared memory. The multiple code images and address mapping, in turn, adds complexity to software management/configuration process for the system.
The present invention concerns a circuit comprising a processor and a translation circuit. The processor may be configured to present a first address. The translation circuit may be configured to (i) determine a mask and an offset, (ii) mask the first address to produce a first masked address, (iii) mask a second address to produce a second masked address, (iv) compare the first masked address with the second masked address, and (v) add the offset to the first address to present a third address in response to the first masked address being at least as great as the second masked address.
The objects, features and advantages of the present invention include providing a method and/or architecture for address translation circuits that may (i) allow multiple processors to utilize a single code image while providing unique shared memory data storage, (ii) require less memory to store code images, and/or (iii) simplify software configuration management.